<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>第三个React虚拟DUO和真实DOM</title>
    <script src="./node_modules/react/umd/react.development.js"></script>
    <script src="./node_modules//react-dom/umd/react-dom.development.js"></script>
    <div id="root"></div>
    <script>
        console.log('React',React,ReactDOM)
        //3.创建React元素
        /**
         * API
         * React.creatElement(type代表元素的类型，属性，节点/子节点)
        */
       let title = React.createElement('h2',null,'你好React')
       
       let root = ReactDOM.createRoot(document.getElementById('root'))

       //渲染元素到页面中
       root.render(title)
       //虚拟DOM->普通对象
       console.log('VDOM',title)
       console.log('TDOM',document.getElementById(root))

       let TDOM = document.getElementById('root')

       let arr = []
       console.log('title-typeof',typeof title,typeof arr)
       console.log('title-instanceof',title instanceof Object)
       console.log('arr-instanceof',arr instanceof Object && arr instanceof Array)
    </script>
</head>
<body>
    
</body>
</html>